gltexture: Make sure downloading textures works in a different thread
authorBenjamin Otte <otte@redhat.com>
Sun, 12 Sep 2021 22:19:35 +0000 (00:19 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 12 Sep 2021 23:40:03 +0000 (01:40 +0200)
commit6785461c2651ad502f46521536619ea77f04dd63
tree8aaea54607adb7e6cf5a2307fec32c9b9383b272
parent6bbec8770088bb9fc61cb71ac9b11a61eae36b52
gltexture: Make sure downloading textures works in a different thread

This happens in the real world when using the inspector to look at a
node recording of a GStreamer video while the video is still playing.

GStreamer will use the GL context in a different thread while we are
busy trying to download it.

A test is included.
gdk/gdkgltexture.c
testsuite/gdk/meson.build
testsuite/gdk/texture-threads.c [new file with mode: 0644]